package shell.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import shell.view.components.InabitTab;
import shell.view.windows.InabitWindow;
/**@author Rafael Rocha*/
public class AddTabListener implements ActionListener{
	private InabitWindow window;
	private InabitTab component;
	private String tabTitle;
	
	public AddTabListener(InabitWindow window, String tabTitle, InabitTab component) {
		this.window = window;
		this.tabTitle = tabTitle;
		this.component = component;
	}
	@Override
	public void actionPerformed(ActionEvent e){
		window.addTab(tabTitle, component);
		component.update();
		
	}
}
